package com.ruoyi.bizsys.service.impl;

import com.ruoyi.bizsys.domain.IncreasedLimitList;
import com.ruoyi.bizsys.mapper.IncreasedLimitListMapper;
import com.ruoyi.bizsys.service.IIncreasedLimitListService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 提额名单Service业务层处理
 *
 * @author african-loan
 * @date 2021-07-03
 */
@Service
public class IncreasedLimitListServiceImpl implements IIncreasedLimitListService {
    @Autowired
    private IncreasedLimitListMapper increasedLimitListMapper;

    /**
     * 查询提额名单
     *
     * @param id 提额名单ID
     * @return 提额名单
     */
    @Override
    public IncreasedLimitList selectIncreasedLimitListById(Long id) {
        return increasedLimitListMapper.selectIncreasedLimitListById(id);
    }

    /**
     * 查询提额名单列表
     *
     * @param increasedLimitList 提额名单
     * @return 提额名单
     */
    @Override
    public List<IncreasedLimitList> selectIncreasedLimitListList(IncreasedLimitList increasedLimitList) {
        return increasedLimitListMapper.selectIncreasedLimitListList(increasedLimitList);
    }

    /**
     * 新增提额名单
     *
     * @param increasedLimitList 提额名单
     * @return 结果
     */
    @Override
    public int insertIncreasedLimitList(IncreasedLimitList increasedLimitList) {
        increasedLimitList.setCreateTime(DateUtils.getNowDate());
        return increasedLimitListMapper.insertIncreasedLimitList(increasedLimitList);
    }

    /**
     * 修改提额名单
     *
     * @param increasedLimitList 提额名单
     * @return 结果
     */
    @Override
    public int updateIncreasedLimitList(IncreasedLimitList increasedLimitList) {
        increasedLimitList.setUpdateTime(DateUtils.getNowDate());
        return increasedLimitListMapper.updateIncreasedLimitList(increasedLimitList);
    }

    /**
     * 批量删除提额名单
     *
     * @param ids 需要删除的提额名单ID
     * @return 结果
     */
    @Override
    public int deleteIncreasedLimitListByIds(Long[] ids) {
        return increasedLimitListMapper.deleteIncreasedLimitListByIds(ids);
    }

    /**
     * 删除提额名单信息
     *
     * @param id 提额名单ID
     * @return 结果
     */
    @Override
    public int deleteIncreasedLimitListById(Long id) {
        return increasedLimitListMapper.deleteIncreasedLimitListById(id);
    }

}
